<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Jekyll v3.6.0">
<title>下载 &middot; Bootstrap</title>
<!-- Bootstrap 核心CSS -->
<link href="../dist/css/bootstrap.min.css" rel="stylesheet">
<!-- 本文档额外专用css -->
<link href="../assets/css/docsearch.min.css" rel="stylesheet">
<link href="../assets/css/docs.min.css" rel="stylesheet">

<!-- Favicons图标定义 -->
<link rel="apple-touch-icon" href="../assets/img/favicons/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="../assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="../assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
  
<link rel="mask-icon" href="../assets/img/favicons/safari-pinned-tab.svg" color="#563d7c">
<link rel="icon" href="../favicon.ico">
<meta name="msapplication-config" content="../assets/img/favicons/browserconfig.xml">
<meta name="theme-color" content="#563d7c">

<!-- Meta关键字定义 -->
<meta name="description" content="The most popular HTML, CSS, and JS library in the world.">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">

<!-- Twitter -->
<meta name="twitter:site" content="@getbootstrap">
<meta name="twitter:creator" content="@getbootstrap">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Introduction">
<meta name="twitter:description" content="Download Bootstrap to get the compiled CSS and JavaScript, source code, or include it with your favorite package managers like npm, RubyGems, and more.">
<meta name="twitter:image" content="../assets/brand/bootstrap-social.png">

<!-- Facebook -->
<meta property="og:url" content="https://getbootstrap.com/docs/4.0/getting-started/introduction/">
<meta property="og:title" content="Introduction">
<meta property="og:description" content="Download Bootstrap to get the compiled CSS and JavaScript, source code, or include it with your favorite package managers like npm, RubyGems, and more.">
<meta property="og:type" content="website">
<meta property="og:image" content="../assets/brand/bootstrap-social.png">
<meta property="og:image:secure_url" content="../assets/brand/bootstrap-social.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
</head>
<body>
<a id="skippy" class="sr-only sr-only-focusable" href="#content">
<div class="container"> <span class="skiplink-text">跳到主体内容</span> </div>
</a>
<header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar"> <a class="navbar-brand mr-0 mr-md-2" href="../index.html" aria-label="Bootstrap">
  <svg class="d-block" width="36" height="36" viewbox="0 0 612 612" xmlns="http://www.w3.org/2000/svg" focusable="false">
    <title>Bootstrap</title>
    <path fill="currentColor" d="M510 8a94.3 94.3 0 0 1 94 94v408a94.3 94.3 0 0 1-94 94H102a94.3 94.3 0 0 1-94-94V102a94.3 94.3 0 0 1 94-94h408m0-8H102C45.9 0 0 45.9 0 102v408c0 56.1 45.9 102 102 102h408c56.1 0 102-45.9 102-102V102C612 45.9 566.1 0 510 0z"/>
    <path fill="currentColor" d="M196.77 471.5V154.43h124.15c54.27 0 91 31.64 91 79.1 0 33-24.17 63.72-54.71 69.21v1.76c43.07 5.49 70.75 35.82 70.75 78 0 55.81-40 89-107.45 89zm39.55-180.4h63.28c46.8 0 72.29-18.68 72.29-53 0-31.42-21.53-48.78-60-48.78h-75.57zm78.22 145.46c47.68 0 72.73-19.34 72.73-56s-25.93-55.37-76.46-55.37h-74.49v111.4z"/>
  </svg>
  </a>
  <div class="navbar-nav-scroll">
    <ul class="navbar-nav bd-navbar-nav flex-row">
      <li class="nav-item"><a class="nav-link " href="../index.html">首页</a></li>
      <li class="nav-item"><a class="nav-link active" href="index.html">中文手册</a></li>
      <li class="nav-item"><a class="nav-link " href="../examples/index.html">实例</a></li>
      
      
      
      
    </ul>
  </div>
 
  <a class="btn btn-bd-yellow d-none d-lg-inline-block mb-3 mb-md-0 ml-md-3" href="download.html">下载 Bootstrap</a> </header>
<div class="container-fluid">
  <div class="row flex-xl-nowrap">
    <div class="col-12 col-md-3 col-xl-2 bd-sidebar">
      

      <nav class="collapse bd-links" id="bd-docs-nav">
        <div class="bd-toc-item active"> <a class="bd-toc-link" href="index.html">快速入门</a>
          <ul class="nav bd-sidenav">
            <li><a href="index.html">关于</a></li>
            <li class="active bd-sidenav-active"><a href="download.html">下载</a></li>
            <li><a href="contents.html">目录结构</a></li>
            <li><a href="browsers-devices.html">浏览器与设备调优</a></li>
            <li><a href="javascript.html">JavaScript脚本</a></li>
            <li><a href="theming.html">主题化</a></li>
            <li><a href="build-tools.html">编译工具</a></li>
            <li><a href="webpack.html"> Webpack模块化</a></li>
            <li><a href="accessibility.html">无障碍浏览</a></li>
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../layout/overview.html">布局</a>
          <ul class="nav bd-sidenav">
            <li><a href="../layout/overview.html">概览</a></li>
            <li><a href="../layout/grid.html">栅格</a></li>
            <li><a href="../layout/utilities-for-layout.html"> 布局实施建议 </a> </li>
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../content/reboot.html">内容 </a>
          <ul class="nav bd-sidenav">
            <li> <a href="../content/reboot.html"> 初始化与CSS重置 </a> </li>
            <li> <a href="../content/typography.html"> 排版 </a> </li>
            <li> <a href="../content/code.html"> 代码 </a> </li>
            <li> <a href="../content/images.html"> 图片 </a> </li>
            <li> <a href="../content/tables.html"> 表格 </a> </li>
            <li> <a href="../content/figures.html"> 图文框 </a> </li>
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../components/alerts.html"> 组件 </a>
          <ul class="nav bd-sidenav">
    <li><a href="../components/alerts.html"> 警告提示框(Alerts) </a> </li>
    <li><a href="../components/badge.html"> 徽章(Badge) </a> </li>
    <li><a href="../components/breadcrumb.html"> 面包屑导航(Breadcrumb) </a> </li>
    <li><a href="../components/buttons.html"> 按钮(Button) </a> </li>
    <li><a href="../components/button-group.html"> 按钮组(Button-group) </a> </li>
    <li><a href="../components/card.html"> 卡片(Card) </a> </li>
    <li><a href="../components/carousel.html">  轮播效果(Carousell) </a> </li>
    <li><a href="../components/collapse.html"> 折叠面板(Collapse) </a> </li>
    <li><a href="../components/dropdowns.html"> 下拉菜单(Dropdown) </a> </li>
    <li><a href="../components/forms.html"> 表单(Form) </a> </li>
    <li><a href="../components/input-group.html"> 输入框(Input-group) </a> </li>
    <li><a href="../components/jumbotron.html"> Hero大块屏(Jumbotron) </a> </li>
    <li><a href="../components/list-group.html"> 列表组(List-group) </a> </li>
    <li><a href="../components/media-object.html"> 媒体对象/图文混排(Media-object) </a> </li>
    <li><a href="../components/modal.html"> 弹出模态框(Modal) </a> </li>
    <li><a href="../components/navs.html"> 导航/滑动门(Nav) </a> </li>
    <li><a href="../components/navbar.html"> 导航栏(Navbar) </a> </li>
    <li><a href="../components/pagination.html"> 分页(Pagination) </a> </li>
    <li><a href="../components/popovers.html"> POP提示(Popover) </a> </li>
    <li><a href="../components/progress.html"> 进度条(Progress) </a> </li>
    <li><a href="../components/scrollspy.html"> 滚动监听(Scrollspy) </a> </li>
    <li><a href="../components/spinners.html"> 旋转特效(Spinners) </a> </li>
    <li><a href="../components/toasts.html"> 弹出提示框(Toasts) </a> </li>
    <li><a href="../components/tooltips.html"> 提示冒泡(Tooltip) </a> </li>
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../utilities/borders.html"> 公共样式 </a>
          <ul class="nav bd-sidenav">
            <li> <a href="../utilities/borders.html"> 边框(border) </a> </li>
            <li> <a href="../utilities/clearfix.html"> 清动浮动(clearfix) </a> </li>
            <li> <a href="../utilities/close-icon.html"> 关闭图标(close icon) </a> </li>
            <li> <a href="../utilities/colors.html"> 颜色(color) </a> </li>
            <li> <a href="../utilities/display.html"> Display显示属性 </a> </li>
            <li> <a href="../utilities/embed.html"> 嵌入(embed) </a> </li>
            <li> <a href="../utilities/flex.html"> Flex弹性布局 </a> </li>
            <li> <a href="../utilities/float.html"> Float浮动属性 </a> </li>
            <li> <a href="../utilities/image-replacement.html"> 图像替换 </a> </li>
			<li><a href="../utilities/overflow.html"> 溢出 </a> </li>
            <li> <a href="../utilities/position.html"> 固顶(底）及定位 </a> </li>
            <li> <a href="../utilities/screenreaders.html"> 读屏器 (Screenreaders) </a> </li>
			<li><a href="../utilities/shadows.html"> 阴影(shadows) </a> </li>
            <li> <a href="../utilities/sizing.html"> 规格(sizi) </a> </li>
            <li> <a href="../utilities/spacing.html"> 间隔(spacing) </a> </li>
            <li> <a href="../utilities/text.html"> 文本处理 </a> </li>
            <li> <a href="../utilities/vertical-align.html"> 垂直对齐(vertical align) </a> </li>
            <li> <a href="../utilities/visibility.html"> Visibility显示或隐藏(能见度)处理 </a> </li>
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../extend/approach.html"> 延伸 </a>
          <ul class="nav bd-sidenav">
            <li><a href="../extend/approach.html"> 方法论 </a> </li>
            <li> <a href="../extend/icons.html"> 图标 </a> </li>
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../migration/index.html"> 迁移 </a>
          <ul class="nav bd-sidenav">
          </ul>
        </div>
        <div class="bd-toc-item"> <a class="bd-toc-link" href="../about/history.html"> 关于 </a>
          <ul class="nav bd-sidenav">
            <li> <a href="../about/history.html"> 成长历史 </a> </li>
            <li> <a href="../about/team.html"> 项目团队 </a> </li>
            <li> <a href="../about/brand.html"> 品牌标志 </a> </li>
            <li> <a href="../about/license.html"> 许可授权 </a> </li>
            <li> <a href="../about/translations.html"> 翻译 </a> </li>
          </ul>
        </div>
      </nav>

    </div>
    <div class="d-none d-xl-block col-xl-2 bd-toc">
      <ul class="section-nav">
        <li class="toc-entry toc-h2"><a href="#compiled-css-and-js">编译版（推荐使用）</a></li>
        <li class="toc-entry toc-h2"><a href="#source-files">源码包（高级用户）</a></li>
        <li class="toc-entry toc-h2"><a href="#bootstrap-Examples">实例包</a></li>
        <li class="toc-entry toc-h2"><a href="#bootstrap-cdn">Bootstrap CDN在线引用</a></li>
        <li class="toc-entry toc-h2"><a href="#package-managers">程序打包方式</a>
          <ul>
            <li class="toc-entry toc-h3"><a href="#npm">npm Node.JS安装</a></li>
            <li class="toc-entry toc-h3"><a href="#rubygems">RubyGems安装</a></li>
            <li class="toc-entry toc-h3"><a href="#yarn">yarn安装</a></li>
            <li class="toc-entry toc-h3"><a href="#nuget">NuGet 安装（对于微软.NET开发者</a></li>
            <li class="toc-entry toc-h3"><a href="#composer">Composer 安装（对于PHP开发者</a></li>
          </ul>
        </li>
      </ul>
    </div>
    <main class="col-12 col-md-9 col-xl-8 py-md-3 pl-md-5 bd-content" role="main">
      <h1 class="bd-title" id="content">下载</h1>
      <p class="bd-lead">Bootstrap 提供离线的源码下载，并提供编译前less代码，或者你也可以使用Node.js、 RubyGems等方式来安装，灵活方便。</p>
       
	  <h2 id="compiled-css-and-js">编译版（推荐使用）</h2>
      <p>下载最新的 <strong>Bootstrap v4.5.3</strong> 即用型代码包，其中包括:</p>
      <ul>
        <li>精简压缩后的CSS文件 </li>
        <li>精简压缩最小化后的 JavaScript 插件</li>
      </ul>
      <p>（不包含使用文档、源文件、以及Jqurey和Popper.js文件）。</p> 
      <p><a href="https://gitee.com/liukuaizhuan/bootstrap4/raw/master/bootstrap-4.5.3-dist.zip" class="btn btn-bd-purple" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">立即下载</a></p>
      <h2 id="source-files">源码包（高级用户）</h2>
      <p>下载完整的Sass、JavaScript和文档，并可使用工具对Bootstrap进行重编译，推荐使用：</p>
      <ul>
        <li>Libsass 或 Ruby Sass 以及其它Sass编译工具。</li>
        <li><a href="https://github.com/postcss/autoprefixer">Autoprefixer</a>-浏览器自动兼容前缀的处理程序。</li>
      </ul>
      <p>构建后的版本只能于Bootstrap及其文档的分支，应不包含重新发行之商业目的</p>
      <p><a href="https://gitee.com/liukuaizhuan/bootstrap4/raw/master/bootstrap-4.5.3.zip" class="btn btn-bd-purple" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download source');">获得源码</a></p>
      <h2 id="bootstrap-Examples">Bootstrap 使用实例</h2>
	  <p>如果你想获在我们的全部<a href="../examples/index.html">官方实例</a>，可以点击这里下载：</p>
	   <p><a href="https://gitee.com/liukuaizhuan/bootstrap4/raw/master/bootstrap-4.5.3-examples.zip" class="btn btn-bd-purple" onclick="ga('send', 'event', 'Getting started', 'Download', 'Download Bootstrap');">立即下载实例包</a></p>
      <h2 id="bootstrap-cdn">Bootstrap CDN在线引用</h2>
      <p>通过我们在maxcdn部署的线上版本，跳过下载和本地部署，直接引用到你的项目（如果是离线项目这种方式是无效的）。</p>
   <figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">href=</span><span class="s">"https://stackpath.bootstrapcdn.com/bootstrap/4.5.3/css/bootstrap.min.css"</span> <span class="na">integrity=</span><span class="s">"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"</span> <span class="na">crossorigin=</span><span class="s">"anonymous"</span><span class="nt">&gt;</span>
<span class="nt">&lt;script </span><span class="na">src=</span><span class="s">"https://stackpath.bootstrapcdn.com/bootstrap/4.5.3/js/bootstrap.min.js"</span> <span class="na">integrity=</span><span class="s">"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"</span> <span class="na">crossorigin=</span><span class="s">"anonymous"</span><span class="nt">&gt;&lt;/script&gt;</span></code></pre></figure>
      <p>这其中包括Css、Jquery、Popper.js都是可以直接用线上CDN版本的URL引用，简单高效。</p>
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt">&lt;script </span><span class="na">src=</span><span class="s">"https://code.jquery.com/jquery-3.3.1.slim.min.js"</span> <span class="na">integrity=</span><span class="s">"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"</span> <span class="na">crossorigin=</span><span class="s">"anonymous"</span><span class="nt">&gt;&lt;/script&gt;</span>
<span class="nt">&lt;script </span><span class="na">src=</span><span class="s">"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"</span> <span class="na">integrity=</span><span class="s">"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"</span> <span class="na">crossorigin=</span><span class="s">"anonymous"</span><span class="nt">&gt;&lt;/script&gt;</span></code></pre></figure>
      <h2 id="package-managers">程序打包方式 Package managers</h2>
      <p>通过 <strong> Sass 工具 和 <a href="https://github.com/postcss/autoprefixer">Autoprefixer 多浏览器兼容处理程式</a> </strong> 将 Bootstrap  <strong>源码</strong> 与您的项目完整打包结合，这样避免出现BootStrap的显式文件名在你的源码中。</p>
      <h3 id="npm">NodeJS安装方式</h3>
      <p>一行代码完成安装 <a href="https://www.npmjs.com/package/bootstrap">查看我们在npm上托管源码结构</a>:</p>
      <figure class="highlight">
        <pre><code class="language-sh" data-lang="sh">npm install bootstrap@4.5.3</code></pre>
      </figure>
      <p><code class="highlighter-rouge">require('bootstrap')</code> 会将所有Bootstrap的jQuery插件加载到jQuery对象上。 <code class="highlighter-rouge">bootstrap</code> 模块本身不输出任何运作，你需要通过 Bootstrap 根目录下的 <code class="highlighter-rouge">/js/*.js</code> 文件夹中的文件来进行配置。.</p>
      <p>根目录下的 <code class="highlighter-rouge">package.json</code> 文件包含以下元素的定义：</p>
      <ul>
        <li><code class="highlighter-rouge">sass</code> - 目录，这是 Bootstrap中 <a href="http://sass-lang.com/">Sass</a> 文件存放路径。</li>
        <li><code class="highlighter-rouge">style</code> - 目录，这是Bootstrap中没有压缩的 CSS文件。</li>
      </ul>
     <h3 id="yarn">yarn安装</h3>
      <p>Yarn是由Facebook、Google、Exponent 和 Tilde 联合推出了一个新的 JS 包管理工具（译者注），你可以使用yarn来获取Bootstrap，命令是：</p>
      <figure class="highlight">
        <pre><code class="language-sh" data-lang="sh">yarn add bootstrap</code></pre>
      </figure>
      <p>免工具纯命令行模式指令:</p>
      <figure class="highlight">
        <pre><code class="language-sh" data-lang="sh">gem install bootstrap <span class="nt">-v</span> 4.5.3</code></pre>
      </figure>
      <p><a href="https://github.com/twbs/bootstrap-rubygem/blob/master/README.md">关于RubyGems安装的更多文档</a>。</p>      
      <h3 id="rubygems">RubyGems安装</h3>
      <p><strong>推荐</strong>使用 <a href="https://bundler.io/">Bundler工具</a> 进行 <a href="https://rubygems.org/">RubyGems安装</a> ， <a href="https://bundler.io/gemfile.html"><code class="highlighter-rouge">Gemfile</code></a>命令：</p>
      <figure class="highlight">
        <pre><code class="language-ruby" data-lang="ruby"><span class="n">gem</span> <span class="s1">'bootstrap'</span><span class="p">,</span> <span class="s1">'~&gt; 4.1.3'</span></code></pre>
      </figure>
      <p>免工具纯命令行模式指令:</p>
      <figure class="highlight">
        <pre><code class="language-sh" data-lang="sh">gem install bootstrap <span class="nt">-v</span> 4.5.3</code></pre>
      </figure>
      <p><a href="https://github.com/twbs/bootstrap-rubygem/blob/master/README.md">关于RubyGems安装的更多文档</a>。</p>
      <h3 id="composer">Composer 安装（对于PHP开发者）</h3>
      <p>支持PHP开发者喜爱的<a href="https://getcomposer.org/">Composer</a>依赖管理工具安装，执行：</p>
      <figure class="highlight">
        <pre><code class="language-sh" data-lang="sh">composer require twbs/bootstrap:4.5.3</code></pre>
      </figure>
	  <h3 id="nuget">NuGet 安装（对于微软.NET开发者）</h3>
      <p>对于微软平台广大的 .NET 开发人员使用<a href="https://www.nuget.org/">NuGet</a> 工具可以快速部署<a href="https://www.nuget.org/packages/bootstrap/">CSS</a> 和 <a href="https://www.nuget.org/packages/bootstrap.sass/">Sass</a> 并引入全局 JavaScript：</p>
      <figure class="highlight">
        <pre><code class="language-powershell" data-lang="powershell">Install-Package bootstrap</code></pre>
      </figure>
      <figure class="highlight">
        <pre><code class="language-powershell" data-lang="powershell">Install-Package bootstrap.sass</code></pre>
      </figure>
    </main>
  </div>
</div>

<script src="../js/jquery-3.2.1.slim.min.js"></script> 
<script>window.jQuery || document.write('<script src="../assets/js/vendor/jquery-slim.min.js"><\/script>')</script> 
<script src="../dist/js/popper.min.js"></script> 
<script src="../dist/js/bootstrap.min.js"></script> 
<script src="../assets/js/docs.min.js"></script> 
<script src="../assets/js/ie-emulation-modes-warning.js"></script> 
<script src="../assets/js/docsearch.min.js"></script> 
 

</body>
</html>
